﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessObject;
using DataTransferObjects;

namespace Business
{
    public class AccountAndKeyBUS
    {
        static public void exportInforToFile(String strFilePath, int iUserID)
        {
            AccountInforDTO accountInfor = AccountDAO.getAccInforFromDB(iUserID);
            KeyInforDTO keyInfor = KeyDAO.getKeyInforFromDB(iUserID);

            AccountAndKeyDTO accountAndKey = new AccountAndKeyDTO(accountInfor, keyInfor);
            AccountAndKeyDAO.exportAccountAndKeyToFile(strFilePath, accountAndKey);
        }

        static public bool importInforFromFile(String strFilePath)
        {
            return AccountAndKeyDAO.importAccountAndKeyFromFile(strFilePath);
        }
    }
}
